package com.ideaaedi.springcloud.jd.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ideaaedi.springcloud.jd.commonds.entity.user.po.SysUserPO;
import com.ideaaedi.springcloud.jd.commonds.entity.user.vo.req.SysUserListReqVO;
import com.ideaaedi.springcloud.jd.commonds.entity.user.vo.resp.SysUserListRespVO;
import com.ideaaedi.springcloud.jd.commonds.entity.user.vo.resp.UserDeptPostInfoRespVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 系统-用户表  (内部员工表) Mapper 接口
 * </p>
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img
 * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 2021.0.1.A
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUserPO> {
    
    /**
     * 查询用户列表
     *
     * @param page 分页信息
     * @param req 请求参数
     *
     * @return 用户列表
     */
    IPage<SysUserListRespVO> list(IPage<?> page, @Param("req") SysUserListReqVO req);
    
    /**
     * 查询用户的部门和职位
     *
     * @param userId 用户id
     *
     * @return 用户的部门和职位
     */
    List<UserDeptPostInfoRespVO> listDeptPost(@Param("userId") Long userId);
}
